import parseStyle from '@/views/appraisal/index/map/utils/style'

export const featureStyle = {
  stroke: {
    color: '#ff0000', // 设置线的颜色为红色
    width: 1 // 设置线的宽度
  }
}

export const lineStyle = {
  stroke: {
    color: '#ff00ff', // 设置线的颜色为红色
    width: 1 // 设置线的宽度
  }
}

export const pointsStyle = {
  circle: {
    radius: 5,
    stroke: {
      width: 1,
      color: '#fff'
    },
    fill: '#409eff'
  }
}

export const hightlightStyle = {
  circle: {
    radius: 5,
    stroke: {
      width: 1,
      color: '#fff'
    },
    fill: '#ff0000'
  }
}

export const pointsFun = (feature) => {
  const type = feature.getProperties().data.type
  switch (type) {
    case 1:
      return parseStyle(hightlightStyle)
      break
    default:
      return parseStyle(pointsStyle)
      break
  }
}
